package com.spice.service.entity.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import com.spice.common.constant.PermissionConstant;
import com.spice.common.model.BaseEntity;
import com.spice.common.util.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(PermissionConstant.INGREDIENT)
@ApiModel(description = "配料展开表")
public class Ingredient extends BaseEntity {
    @ApiModelProperty(value = "原料",example = "白味噌")
    @ExcelProperty(value = "原料")
    private String source;

    @ApiModelProperty(value = "展开信息",example = "水，大豆，大米，食用盐，食用酒精")
    @ExcelProperty(value = "展开信息")
    private String furtherinfo;

    @ApiModelProperty(value = "维护人",example = "张三")
    @ExcelProperty(value = "维护人")
    private String maintainer;

    @ApiModelProperty(value = "维护时间",example = "2021-06-28 20:48:20")
    @ExcelProperty(value = "维护时间（系统注入）")
    private String maintainTime;

    @Override
    public Ingredient cleanup() {
        super.cleanup();
        this.setMaintainTime(DateUtil.getNowDateTime());
        return this;
    }
}
